USE [DentalSoftware]
GO

/****** Object:  Table [dbo].[DotDieuTri]    Script Date: 09/11/2011 12:40:55 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[DotDieuTri](
	[Ma] [int] IDENTITY(1,1) NOT NULL,
	[MaBenhNhan] [int] NULL,
	[NgayKham] [datetime] NULL,
	[MaBacSi] [int] NULL,
	[LyDoKham] [nvarchar](max) NULL,
	[ChanDoan] [nvarchar](max) NULL,
	[Rang] [nchar](10) NULL,
	[CongViec] [nvarchar](max) NULL,
	[ChiPhi] [float] NULL,
	[DuaTruoc] [float] NULL,
	[ConLai] [float] NULL,
	[GhiChu] [nvarchar](max) NULL,
 CONSTRAINT [PK_DotDieuTri] PRIMARY KEY CLUSTERED 
(
	[Ma] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[DotDieuTri]  WITH CHECK ADD  CONSTRAINT [FK_DotDieuTri_BacSi] FOREIGN KEY([MaBacSi])
REFERENCES [dbo].[BacSi] ([Ma])
GO

ALTER TABLE [dbo].[DotDieuTri] CHECK CONSTRAINT [FK_DotDieuTri_BacSi]
GO

ALTER TABLE [dbo].[DotDieuTri]  WITH CHECK ADD  CONSTRAINT [FK_DotDieuTri_BenhNhan] FOREIGN KEY([MaBenhNhan])
REFERENCES [dbo].[BenhNhan] ([Ma])
GO

ALTER TABLE [dbo].[DotDieuTri] CHECK CONSTRAINT [FK_DotDieuTri_BenhNhan]
GO


